Range
Function
This API is used to get the parameter range of Alarm > IO Alarm(cloud dedicated) > Alarm Input.
Note:
The Range provides reference information for client UI input limits and API request limits. When sending Get and Set requests, the parameters must be strictly limited according to the Range, otherwise the request may be rejected by the device.
Request Message
None.
Sample:
POST /API/AlarmConfig/IO/Range HTTP/1.1
{
"version": "1.0",
"data": {}
}
Response Message
Parameter Description
Table 1
Parameter | Range | Type | Description |
---|---|---|---|
channel_info | Json Object | Channel information, see Table 2 for more information | |
channel_max | int | Total number of channels on the device. |
Table 2
Parameter | Range | Type | Description |
---|---|---|---|
Local<-1 | Json Object | Json see Table 3 for more information | |
... | Json Object | ||
IP_CH1<-1 | Json Object | ||
... | Json Object |
Table 3
Parameter | Range | Type | Description |
---|---|---|---|
alarm_type | "NormallyOpen", "NormallyClose", "Off" | string | I/O status alarm. |
alarm_settings | "Disable","Input" | string | I/O alarm Settings。 |
latch_time | "10","20","40","60"或者“5”“10”“20”“30” | string | Alarm output time. |
buzzer | "0","10","20","40","60" | string | Buzzer time (NVR/DVR dedicated)。 |
alarm_out | "Local->1"…"Local->x" "IP_CH1->1"…"IP_CHx->x" The number of channels depends on the functionality of the device. | string array | Alarm output channel. The array member represents an alert output channel as a string. Local->1: enable, null: disable. |
post_recording | "30", "60", "120", "300"或者"0", "5" "10","20","30" | string | Video delay time. |
send_email | bool | Switch of sending mails. | |
ftp_picture_upload | bool | Channel video FTP upload switch. | |
picture_to_cloud | bool | Image upload switch. | |
video_to_cloud | bool | Video cloud upload switch (NVR/DVR dedicated). | |
ftp_video_upload | bool | Channel video FTP upload switch (NVR/DVR special). | |
show_message | bool | Display message switch (NVR/DVR specific). | |
full_screen | bool | Full screen switch (NVR/DVR special). | |
channel | "CH1"…"CHx" "IP_CH1"…"IP_CHx" "WIFI_CH1"…"WIFI_CHx" | array | Channel alarm linkage switch Channel alarm linkage switch, each value represents a channel switch. |
voice_prompts_index | 0~4294967295 | int | File index (0 to 4294967295, 0 is None, that is, no audio file is selected). Each file is named "index _ file name" (1_i will try). When displayed on the page, hide "index _", for example, "1_i will try", and display only "i will try". |
voice_prompts_select | array | Indicates the playback channel, which is calculated in bits. (bit0 is the local, bit1 corresponds to front-end channel 1, and bit2 corresponds to channel 2.) | |
voice_prompts_time | array | Time range: The 12 time ranges cannot conflict with each other. | |
record_enable | bool | Video switch. | |
light_linkage | bool | White light linkage switch. | |
enforcerlight_linkage | bool | Alarm light linkage switch. | |
siren_linkage | bool | Alarm linkage switch. | |
http_listening | bool | eventpush linkage switch. | |
schedule_list | Json array | Json,see Table 4 for more information | |
chnNum | "Local<-1"... | string | Number of channels |
chn_index | "Local<-1"... | string | Channel index |
ptz_linkage_disable | bool | disable the ptzlinkage page | |
ptz_linkage_settings | object | Json See Table 5. | |
voice_prompts_speaker_select | array | Indicates the playback ip speaker, which is calculated in bits. (bit0 is the ip speaker 1, bit1 corresponds to front-end ip speaker 2.) |
Table 4
Parameter | Range | Type | Description |
---|---|---|---|
items | "Local->1", "Local->2", "Local->3", "Local->4", "Local->5", "Local->6", "Local->7", "Local->8" | string | Channel information |
enable | bool | Check whether the schedule is enabled | |
start_time | 0~1439 | int | Start time |
end_time | 0~1440 | int | end time |
weekday | "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" | string | number of days |
Table 5
Parameter | Range | Type | Description |
---|---|---|---|
ptz_linkage_chn | array | ptz linkage channel. | |
ptz_linkage_data | array | ptz linkage data. | |
preset_dwell_time | [min:max] | int | preset dwell time minimum time 1(min),maximum time 20(max)。 |
preset_num | [min:max] | int | preset num minimum 1(min),maximum 255(max). |
trace_num | [min:max] | int | trace num minimum1(min),maximum 4(max)。 |
pattern_scan_num | [min:max] | int | pattern scan num minimum 1(min),maximum 4(max). |
ptz_linkage_name | "Mode_Preset", "Mode_Trace", "Mode_Pattern_Scan" | array | preset name. |
Tips:
The response message of the Range request may not contain all the fields in the above table, and the fields not included indicate that the device does not support this parameter configuration.
Sample:
HTTP/1.1 200 OK
Content-Type: application/json
{
"result": "success",
"data": {
"channel_max": 1,
"channel_info": {
"type": "object",
"items": {"Local<-1": {
"type": "object",
"items": {
"alarm_type": {
"type": "string",
"items": [
"Normally-Open",
"Normally-Close"
]
},
"alarm_settings": {
"type": "string",
"items": [
"Disable",
"Input"
]
},
"alarm_out": {
"type": "array",
"min_size": 0,
"max_size": 1,
"items": {
"type": "string",
"items": ["Local->1"]
}
},
"record_enable": {"type": "bool"},
"post_recording": {
"type": "string",
"items": [
"0",
"5",
"10",
"20",
"30"
]
},
"send_email": {"type": "bool"},
"ftp_picture_upload": {"type": "bool"},
"ftp_video_upload": {"type": "bool"},
"light_linkage": {"type": "bool"},
"siren_linkage": {"type": "bool"},
"schedule_list": {
"type": "array",
"min_size": 0,
"max_size": 8,
"items": {
"type": "string",
"items": [
"Local->1",
"Local->2",
"Local->3",
"Local->4",
"Local->5",
"Local->6",
"Local->7",
"Local->8",
{
"type": "string",
"items": [
"Local->1",
"Local->2",
"Local->3",
"Local->4",
"Local->5",
"Local->6",
"Local->7",
"Local->8"
],
"enable": {"type": "bool"},
"start_time": {
"type": "int32",
"min": 0,
"max": 1439
},
"end_time": {
"type": "int32",
"min": 0,
"max": 1440
},
"weekday": {
"type": "array",
"min_size": 1,
"max_size": 7,
"items": [{
"type": "string",
"items": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
]
}]
}
}
]
}
},
"ptz_linkage": {
"type": "object",
"items": {"CH8": {
"type": "object",
"items": {
"ptz_linkage_chn": {
"type": "array",
"min_size": 0,
"max_size": 32,
"items": {
"type": "string",
"items": ["CH8"]
}
},
"ptz_linkage_name": {
"type": "array",
"min_size": 0,
"max_size": 3,
"items": {
"type": "string",
"items": [
"Mode_Preset",
"Mode_Trace",
"Mode_Pattern_Scan"
]
}
},
"preset_dwell_time": {
"type": "int32",
"min": 1,
"max": 20,
"default_value": 5
},
"preset_num": {
"type": "int32",
"items": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54,
55,
56,
57,
58,
59,
60,
61,
62,
63,
64,
65,
66,
67,
68,
69,
70,
71,
72,
73,
74,
75,
76,
77,
78,
79,
80,
81,
82,
83,
84,
85,
86,
87,
88,
89,
90,
91,
92,
93,
94,
95,
96,
97,
98,
99,
100,
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120,
121,
122,
123,
124,
125,
126,
127,
128,
129,
130,
131,
132,
133,
134,
135,
136,
137,
138,
139,
140,
141,
142,
143,
144,
145,
146,
147,
148,
149,
150,
151,
152,
153,
154,
155,
156,
157,
158,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
170,
171,
172,
173,
174,
175,
176,
177,
178,
179,
180,
181,
182,
183,
184,
185,
186,
187,
188,
189,
190,
191,
192,
193,
194,
195,
196,
197,
198,
199,
200,
201,
202,
203,
204,
205,
206,
207,
208,
209,
210,
211,
212,
213,
214,
215,
216,
217,
218,
219,
220,
221,
222,
223,
224,
225,
226,
227,
228,
229,
230,
231,
232,
233,
234,
235,
236,
237,
238,
239,
240,
241,
242,
243,
244,
245,
246,
247,
248,
249,
250,
251,
252,
253,
254,
255
]
},
"trace_num": {
"type": "int32",
"items": [
1,
2,
3,
4
]
},
"pattern_scan_num": {
"type": "int32",
"items": [
1,
2,
3,
4
]
}
}
}}
},
"ptz_linkage_disable": false
}
}}
}
}
}
Error Code
See Response Messages Body and Common error_code for more information.